﻿<Fluent:RibbonWindow x:Class="MyCalManager.MainWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                     xmlns:Helper="clr-namespace:MyCalManager.Helper"
                     MinHeight="550"
                     MinWidth="650"
                     Title="MyCalManager"
                     Icon="/MyCalManager;component/Images/App.ico"
                     Loaded="RibbonWindow_Loaded"
                     Closing="Window_Closing"
                     DataContext="{Binding Main, Source={StaticResource Locator}}">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Skins/Theme.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Blue.xaml" />
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <DockPanel Helper:AdornerBehaviour.ShowAdorner="{Binding ShowWait}" Helper:AdornerBehaviour.Control="{DynamicResource MsgBox}">
        <Fluent:Ribbon DockPanel.Dock="Top" IsQuickAccessToolBarVisible="False">
            <Fluent:RibbonTabItem Header="Main">
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding UserPage}" Header="{Loc UserBtnTxt}" LargeIcon="Images\Window025.ico" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="" >
                    <Fluent:Button Header="Info" Command="{Binding About}" LargeIcon="Images\about.png"></Fluent:Button>
                    <Fluent:Button Command="{Binding Close}" Header="{Loc GraphClose}" LargeIcon="Images\Close.png" Icon="Images\Close_1.png" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="{Loc EditDB}">
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding EditFoodDB}" Header="{Loc SmallEditDBBtn}" LargeIcon="Images\Database.png" />
                    <Fluent:Button Command="{Binding EditUserDB}" Header="{Loc SmallEditUserDBBtn}" LargeIcon="Images\Database.png" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Graph">
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding MonthGraph}" Header="{Loc Month}" LargeIcon="Images\Window041.ico" />
                    <Fluent:Button Command="{Binding YearGraph}" Header="{Loc Year}" LargeIcon="Images\Window041.ico" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
        </Fluent:Ribbon>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="35"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Helper:FaderFrame TransitionType="SlideAndFade" Grid.Row="0" Grid.Column="0" Source="{Binding Page}" NavigationUIVisibility="Hidden"></Helper:FaderFrame>
            <StatusBar Grid.Row="1" Grid.Column="0" >
                <StatusBarItem>
                    <Image Width="35" Source="{Binding BarImage}" ></Image>
                </StatusBarItem>
                <StatusBarItem HorizontalContentAlignment="Stretch"> 
                    <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Message}" FontSize="14" Foreground="DarkOrange" FontWeight="Bold"></TextBlock>
                </StatusBarItem>
            </StatusBar>
        </Grid>
    </DockPanel>
</Fluent:RibbonWindow>
